package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IBookCompanyDao;
import org.jsbd.boss.domian.BookCompany;

public class BookCompanyDaoImpl extends CrackBaseDao implements IBookCompanyDao {

	@Override
	public void save(BookCompany bookCompany) {
		super.insert("qy_book_company.insert_book_company", bookCompany);
	}

	@Override
	public void save(List<BookCompany> list) {
		super.batchInsert("qy_book_company.insert_book_company", list);
	}

	@Override
	public int update(BookCompany bookCompany) {
		return super.update("qy_book_company.update_book_company", bookCompany);
	}

	@Override
	public BookCompany get(BookCompany bookCompany) {
		return (BookCompany) super.queryForObject("qy_book_company.select_book_company_one", bookCompany);
	}

	@Override
	public BookCompany getById(Integer id) {
		return (BookCompany) super.queryForObject("qy_book_company.select_by_id", id);
	}
	

	@SuppressWarnings("unchecked")
	@Override
	public List<BookCompany> getList(BookCompany bookCompany) {
		return super.queryForList("qy_book_company.select_book_company_list", bookCompany);
	}

	@Override
	public Integer getListPageCount(BookCompany bookCompany) {
		return super.queryForCount("qy_book_company.select_book_company_page_count", bookCompany);
	}
	
	@Override
	public void delete(List<Integer> ids) {
		super.batchUpdate("qy_book_company.delete_book_company", ids);
	}
	
}
